package com.zijin.Dao;

import com.zijin.entity.Answer;
import com.zijin.entity.Question;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AnswerMapper {
    @Select("select question.content,answer.acontent from question,answer where question.qid=answer.aqid and qid=#{qid}")
    List<Answer> getAnswerByQuestionId(int qid);
    @Select("select user.name,answer.acontent from user,answer where user.id=answer.id and user.id=#{id}")
    List<Answer> getAnswerByUserId(int id);
    @Select("select astatus from answer where aid=#{aid}")
    Answer getAnswerByAid(int aid);
}
